package ing.gzq.dao;

import ing.gzq.model.Answer;
import ing.gzq.model.Question;
import ing.gzq.model.vo.AnswerCountVO;
import ing.gzq.model.vo.QuestionStudentVO;
import ing.gzq.model.vo.QuestionTeacherVO;
import org.apache.ibatis.annotations.Lang;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface QuestionDao {


    void insertQuestion(Question question);

    Question getQuestionById(Long questionId);

    void deleteQuestion(Long questionId);

    void deleteAnswer(Long questionId);

    List<QuestionTeacherVO> getQuestionByTeacher(@Param("courseId") Long courseId, @Param("teacherId") String teacherId);

    List<AnswerCountVO> getAnswerCount(Long questionId);

    List<QuestionStudentVO> getQuestionByStudent(@Param("courseId") Long courseId,@Param("studentId") String studentId);

    int checkAnswered(@Param("studentId") String studentId,@Param("questionId") Long questionId);

    void uploadAnswer(Answer answer);
}
